package jp.dodododo.aop.intercept;

import java.lang.reflect.AccessibleObject;

import jp.dodododo.aop.HasTargetClass;
import jp.dodododo.aop.annotation.Enhance;

import org.aopalliance.intercept.Invocation;

@Enhance(false)
public abstract class AbstractInvocation implements Invocation, HasTargetClass {
	private Object target;

	private AccessibleObject staticPart;

	private Object[] arguments;

	private Class<?> targetClass;

	public AbstractInvocation(Object target, Class<?> targetClass, AccessibleObject staticPart, Object... arguments) {
		this.target = target;
		this.targetClass = targetClass;
		this.staticPart = staticPart;
		this.arguments = arguments;
	}

	public Object[] getArguments() {
		return arguments;
	}

	public AccessibleObject getStaticPart() {
		return staticPart;
	}

	public Object getThis() {
		return target;
	}

	public Class<?> getTargetClass() {
		return targetClass;
	}
}
